namespace 了解委托
{
    //public delegate void sendMessageDelegate(string msg);
    public partial class Form1 : Form
    {
        public event sendMessageDelegate sendEvent;
        public Form1()
        {
            InitializeComponent();
            //Form2 f2 = new Form2();
            //f2.sendEvent += new sendMessageDelegate(recv);
            //f2.Show();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //MessageBox.Show("消息");
            sendEvent("第一个窗体发过来的消息! ");
        }

        //public void recv(string message)
        //{
        //    MessageBox.Show("第一个窗体接受到消息!" + message);
        //}
    }
}
